﻿using IXION.BLOG.DOMAIN.USER;
using System;
using System.Collections.Generic;
using System.Web;

namespace IXION.BLOG.WEB.UI.Admin
{
    public class AdminBase : System.Web.UI.Page
    {
        protected IXION.BLOG.DOMAIN.BLOG.Blog blog;
        protected override void OnInit(EventArgs e)
        {
            blog = Application["Blog"] as IXION.BLOG.DOMAIN.BLOG.Blog;
            User user = Session["User"] as User;
            bool flag = (bool)Session["Admin"];
            //权限检查
            if (!(flag && user != null))
            {
                Response.Redirect("/Admin/Login.aspx");
            }
        }
    }
}